<!doctype html>
<html lang="en" class="no-js">
<head>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Jquery Modal</title>
	<meta name="author" content="Jan Jarfalk">
	<link rel="stylesheet" href="dependencies/modal.css">
	<link rel="stylesheet" href="dependencies/example.css">
	
</head>

	<body>
	
		<div id="page">			
			<p>
				<a href="#modal-about" class="open-about-again">
					Open a modal.
				</a>
			</p>
		</div>
		
		<div id="modal-wrap" class="modal-wrap hidden">
			<div id="modal-overlay" class="overlay"></div>
			
			<div id="modal-one" class="modal">
				<div class="plate">
					<div class="header">
						<h1>This is modal One</h1>
						<a class="modal-close" href="#">Close</a>
					</div>
					<div class="content">
						<p>
							Clicking the button below will open Modal number two using Javascript.
						</p>
						<p>
							<a id="open-next-modal" class="button">Open next modal</a>
						</p>
					</div>
				</div>
			</div>
			
			<div id="modal-two" class="modal">
				<div class="plate">
					<div class="header">
						<h1>This is modal Two</h1>
						<a class="modal-close" href="#">Close</a>
					</div>
					<div class="content">
						<p>
							Clicking the button below will open Modal number two using an anchor.
						</p>
						<p>
							<a href="#modal-three" class="button" rel="modal">Open modal Three</a>
						</p>
					</div>
				</div>
			</div>
			
			<div id="modal-three" class="modal">
				<div class="plate">
					<div class="header">
						<h1>This is modal Two</h1>
						<a class="modal-close" href="#">Close</a>
					</div>
					<div class="content">
						<p>
							Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
						</p>
						<p>
							<a href="#" class="button modal-close">Close modal</a>
						</p>
					</div>
				</div>
			</div>
		</div>

		<script src="jquery.js"></script>
		<script src="jquery.modal.js"></script>
		<script type="text/javascript">
			
			$(function(){
				
				$.modal();
				
				$.modal.open('modals/about.html');
				
				$('.open-about-again').bind('click', function(e) {
					$.modal.open('modals/about.html');
				});
				
				
				$('#open-next-modal').bind('click', function(e) {
					$.modal.open('#modal-two');
				});
				
			});
			
			
		</script>

	</body>
</html>